/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package entidades;

import java.io.Serializable;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 *
 * @author cegarciaa
 */
@Entity
@Table(name = "variablei")
@NamedQueries({
    @NamedQuery(name = "Variablei.findAll", query = "SELECT v FROM Variablei v"),
    @NamedQuery(name = "Variablei.findByIdvariablei", query = "SELECT v FROM Variablei v WHERE v.idvariablei = :idvariablei"),
    @NamedQuery(name = "Variablei.findByNombre", query = "SELECT v FROM Variablei v WHERE v.nombre = :nombre")})
public class Variablei implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "IDVARIABLEI")
    private Long idvariablei;
    @Column(name = "NOMBRE")
    private String nombre;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "variablei")
    private List<Varid> varidList;

    public Variablei() {
    }

    public Variablei(Long idvariablei) {
        this.idvariablei = idvariablei;
    }

    public Long getIdvariablei() {
        return idvariablei;
    }

    public void setIdvariablei(Long idvariablei) {
        this.idvariablei = idvariablei;
    }

    public String getNombre() {
        return nombre;
    }

    public void setNombre(String nombre) {
        this.nombre = nombre;
    }

    public List<Varid> getVaridList() {
        return varidList;
    }

    public void setVaridList(List<Varid> varidList) {
        this.varidList = varidList;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idvariablei != null ? idvariablei.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Variablei)) {
            return false;
        }
        Variablei other = (Variablei) object;
        if ((this.idvariablei == null && other.idvariablei != null) || (this.idvariablei != null && !this.idvariablei.equals(other.idvariablei))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entidades.Variablei[idvariablei=" + idvariablei + "]";
    }

}
